/*
 * @Author: Mcc
 * @Date: 2024-07-29 10:17:14
 * @LastEditors: mcc 550539422@qq.com
 * @LastEditTime: 2024-08-07 16:33:22
 * @FilePath: \ft-apply-admin\src\api\self.ts
 * @Description: 
 * 
 * Copyright (c) 2024 by Mcc, All Rights Reserved. 
 */
//import type { GetUserInfoModel } from './model/userModel'
import { defHttp } from '@/utils/http/axios'

//import type { ErrorMessageMode } from '@/types/axios'

enum Api {
  userLogin = '/auth/userLogin',//后台管理登录
  resetPassword = '/auth/resetPassword', // 修改密码
  getDingTalkVerification = '/dingTalk/getDingTalkVerification', // 获取钉钉验证码验证码接口
  verifyCode = '/auth/verifyCode' // 校验钉钉验证码
}

/**
 * @description: getUserInfo
 */
// login api
export function userLogin(data) {
  return defHttp.post({ url: Api.userLogin, data })
}

// export function doLogout() {
//   return defHttp.post({ url: Api.Logout })
// }

export function resetPassword(data) {
  return defHttp.post({ url: Api.resetPassword, data })
}

export function getDingTalkVerification(params) {
  return defHttp.get({ url: Api.getDingTalkVerification, params },{ isTransformResponse: false })
}

export function verifyCode(params) {
  return defHttp.post({ url: Api.verifyCode, params },{ isTransformResponse: false })
}